/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.artic.jme3gui.client;

import com.jme3.scene.Node;

/**
 *
 * @author PaulSyntax
 */
public class GameNodeSingelton {

    private Node gameNode = null;

    // Private constructor prevents instantiation from other classes
    private GameNodeSingelton() {
        gameNode = new Node(ApplicationConstants.ROOT_NODE);
    }

    /**
     * SingletonHolder is loaded on the first execution of Singleton.getInstance()
     * or the first access to SingletonHolder.INSTANCE, not before.
     */
    private static class GameNodeHolder {
        private static final GameNodeSingelton INSTANCE = new GameNodeSingelton();
    }

    public static GameNodeSingelton getInstance() {
        return GameNodeHolder.INSTANCE;
    }

    public Node getGameNode() {
        return gameNode;
    }

    public void setGameNode(Node gameNode) {
        this.gameNode = gameNode;
    }

}
